/*
 * Flowable CMMN REST API
 * # flowable / flowəb(ə)l /    - a compact and highly efficient workflow and Business Process Management (BPM) platform for developers, system admins and business users.  - a lightning fast, tried and tested BPMN 2 process engine written in Java. It is Apache 2.0 licensed open source, with a committed community.  - can run embedded in a Java application, or as a service on a server, a cluster, and in the cloud. It integrates perfectly with Spring. With a rich Java and REST API, it is the ideal engine for orchestrating human or system activities.
 *
 * OpenAPI spec version: v1
 *
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */


package com.ibm.risk.irmp.workflow.client.flowable.model;

import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * PlanItem
 */

public class PlanItem {
  @JsonProperty("id")
  private String id = null;

  @JsonProperty("xmlRowNumber")
  private Integer xmlRowNumber = null;

  @JsonProperty("xmlColumnNumber")
  private Integer xmlColumnNumber = null;

  @JsonProperty("extensionElements")
  private Map<String, List<ExtensionElement>> extensionElements = null;

  @JsonProperty("attributes")
  private Map<String, List<ExtensionAttribute>> attributes = null;

  @JsonProperty("documentationTextFormat")
  private String documentationTextFormat = null;

  @JsonProperty("documentation")
  private String documentation = null;

  @JsonProperty("name")
  private String name = null;

  @JsonProperty("parent")
  private PlanFragment parent = null;

  @JsonProperty("definitionRef")
  private String definitionRef = null;

  @JsonProperty("planItemDefinition")
  private PlanItemDefinition planItemDefinition = null;

  @JsonProperty("itemControl")
  private PlanItemControl itemControl = null;

  @JsonProperty("criteriaRefs")
  private List<String> criteriaRefs = null;

  @JsonProperty("entryCriteria")
  private List<Criterion> entryCriteria = null;

  @JsonProperty("exitCriteria")
  private List<Criterion> exitCriteria = null;

  @JsonProperty("incomingAssociations")
  private List<Association> incomingAssociations = null;

  @JsonProperty("outgoingAssociations")
  private List<Association> outgoingAssociations = null;

  @JsonProperty("entryDependencies")
  private List<PlanItem> entryDependencies = null;

  @JsonProperty("exitDependencies")
  private List<PlanItem> exitDependencies = null;

  @JsonProperty("entryDependentPlanItems")
  private List<PlanItem> entryDependentPlanItems = null;

  @JsonProperty("exitDependentPlanItems")
  private List<PlanItem> exitDependentPlanItems = null;

  @JsonProperty("behavior")
  private Object behavior = null;

  @JsonProperty("allDependentPlanItems")
  private List<PlanItem> allDependentPlanItems = null;

  @JsonProperty("parentStage")
  private Stage parentStage = null;

  public PlanItem id(String id) {
    this.id = id;
    return this;
  }

   /**
   * Get id
   * @return id
  **/
  @ApiModelProperty(value = "")
  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }

  public PlanItem xmlRowNumber(Integer xmlRowNumber) {
    this.xmlRowNumber = xmlRowNumber;
    return this;
  }

   /**
   * Get xmlRowNumber
   * @return xmlRowNumber
  **/
  @ApiModelProperty(value = "")
  public Integer getXmlRowNumber() {
    return xmlRowNumber;
  }

  public void setXmlRowNumber(Integer xmlRowNumber) {
    this.xmlRowNumber = xmlRowNumber;
  }

  public PlanItem xmlColumnNumber(Integer xmlColumnNumber) {
    this.xmlColumnNumber = xmlColumnNumber;
    return this;
  }

   /**
   * Get xmlColumnNumber
   * @return xmlColumnNumber
  **/
  @ApiModelProperty(value = "")
  public Integer getXmlColumnNumber() {
    return xmlColumnNumber;
  }

  public void setXmlColumnNumber(Integer xmlColumnNumber) {
    this.xmlColumnNumber = xmlColumnNumber;
  }

  public PlanItem extensionElements(Map<String, List<ExtensionElement>> extensionElements) {
    this.extensionElements = extensionElements;
    return this;
  }

  public PlanItem putExtensionElementsItem(String key, List<ExtensionElement> extensionElementsItem) {
    if (this.extensionElements == null) {
      this.extensionElements = new HashMap<String, List<ExtensionElement>>();
    }
    this.extensionElements.put(key, extensionElementsItem);
    return this;
  }

   /**
   * Get extensionElements
   * @return extensionElements
  **/
  @ApiModelProperty(value = "")
  public Map<String, List<ExtensionElement>> getExtensionElements() {
    return extensionElements;
  }

  public void setExtensionElements(Map<String, List<ExtensionElement>> extensionElements) {
    this.extensionElements = extensionElements;
  }

  public PlanItem attributes(Map<String, List<ExtensionAttribute>> attributes) {
    this.attributes = attributes;
    return this;
  }

  public PlanItem putAttributesItem(String key, List<ExtensionAttribute> attributesItem) {
    if (this.attributes == null) {
      this.attributes = new HashMap<String, List<ExtensionAttribute>>();
    }
    this.attributes.put(key, attributesItem);
    return this;
  }

   /**
   * Get attributes
   * @return attributes
  **/
  @ApiModelProperty(value = "")
  public Map<String, List<ExtensionAttribute>> getAttributes() {
    return attributes;
  }

  public void setAttributes(Map<String, List<ExtensionAttribute>> attributes) {
    this.attributes = attributes;
  }

  public PlanItem documentationTextFormat(String documentationTextFormat) {
    this.documentationTextFormat = documentationTextFormat;
    return this;
  }

   /**
   * Get documentationTextFormat
   * @return documentationTextFormat
  **/
  @ApiModelProperty(value = "")
  public String getDocumentationTextFormat() {
    return documentationTextFormat;
  }

  public void setDocumentationTextFormat(String documentationTextFormat) {
    this.documentationTextFormat = documentationTextFormat;
  }

  public PlanItem documentation(String documentation) {
    this.documentation = documentation;
    return this;
  }

   /**
   * Get documentation
   * @return documentation
  **/
  @ApiModelProperty(value = "")
  public String getDocumentation() {
    return documentation;
  }

  public void setDocumentation(String documentation) {
    this.documentation = documentation;
  }

  public PlanItem name(String name) {
    this.name = name;
    return this;
  }

   /**
   * Get name
   * @return name
  **/
  @ApiModelProperty(value = "")
  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public PlanItem parent(PlanFragment parent) {
    this.parent = parent;
    return this;
  }

   /**
   * Get parent
   * @return parent
  **/
  @ApiModelProperty(value = "")
  public PlanFragment getParent() {
    return parent;
  }

  public void setParent(PlanFragment parent) {
    this.parent = parent;
  }

  public PlanItem definitionRef(String definitionRef) {
    this.definitionRef = definitionRef;
    return this;
  }

   /**
   * Get definitionRef
   * @return definitionRef
  **/
  @ApiModelProperty(value = "")
  public String getDefinitionRef() {
    return definitionRef;
  }

  public void setDefinitionRef(String definitionRef) {
    this.definitionRef = definitionRef;
  }

  public PlanItem planItemDefinition(PlanItemDefinition planItemDefinition) {
    this.planItemDefinition = planItemDefinition;
    return this;
  }

   /**
   * Get planItemDefinition
   * @return planItemDefinition
  **/
  @ApiModelProperty(value = "")
  public PlanItemDefinition getPlanItemDefinition() {
    return planItemDefinition;
  }

  public void setPlanItemDefinition(PlanItemDefinition planItemDefinition) {
    this.planItemDefinition = planItemDefinition;
  }

  public PlanItem itemControl(PlanItemControl itemControl) {
    this.itemControl = itemControl;
    return this;
  }

   /**
   * Get itemControl
   * @return itemControl
  **/
  @ApiModelProperty(value = "")
  public PlanItemControl getItemControl() {
    return itemControl;
  }

  public void setItemControl(PlanItemControl itemControl) {
    this.itemControl = itemControl;
  }

  public PlanItem criteriaRefs(List<String> criteriaRefs) {
    this.criteriaRefs = criteriaRefs;
    return this;
  }

  public PlanItem addCriteriaRefsItem(String criteriaRefsItem) {
    if (this.criteriaRefs == null) {
      this.criteriaRefs = new ArrayList<String>();
    }
    this.criteriaRefs.add(criteriaRefsItem);
    return this;
  }

   /**
   * Get criteriaRefs
   * @return criteriaRefs
  **/
  @ApiModelProperty(value = "")
  public List<String> getCriteriaRefs() {
    return criteriaRefs;
  }

  public void setCriteriaRefs(List<String> criteriaRefs) {
    this.criteriaRefs = criteriaRefs;
  }

  public PlanItem entryCriteria(List<Criterion> entryCriteria) {
    this.entryCriteria = entryCriteria;
    return this;
  }

  public PlanItem addEntryCriteriaItem(Criterion entryCriteriaItem) {
    if (this.entryCriteria == null) {
      this.entryCriteria = new ArrayList<Criterion>();
    }
    this.entryCriteria.add(entryCriteriaItem);
    return this;
  }

   /**
   * Get entryCriteria
   * @return entryCriteria
  **/
  @ApiModelProperty(value = "")
  public List<Criterion> getEntryCriteria() {
    return entryCriteria;
  }

  public void setEntryCriteria(List<Criterion> entryCriteria) {
    this.entryCriteria = entryCriteria;
  }

  public PlanItem exitCriteria(List<Criterion> exitCriteria) {
    this.exitCriteria = exitCriteria;
    return this;
  }

  public PlanItem addExitCriteriaItem(Criterion exitCriteriaItem) {
    if (this.exitCriteria == null) {
      this.exitCriteria = new ArrayList<Criterion>();
    }
    this.exitCriteria.add(exitCriteriaItem);
    return this;
  }

   /**
   * Get exitCriteria
   * @return exitCriteria
  **/
  @ApiModelProperty(value = "")
  public List<Criterion> getExitCriteria() {
    return exitCriteria;
  }

  public void setExitCriteria(List<Criterion> exitCriteria) {
    this.exitCriteria = exitCriteria;
  }

  public PlanItem incomingAssociations(List<Association> incomingAssociations) {
    this.incomingAssociations = incomingAssociations;
    return this;
  }

  public PlanItem addIncomingAssociationsItem(Association incomingAssociationsItem) {
    if (this.incomingAssociations == null) {
      this.incomingAssociations = new ArrayList<Association>();
    }
    this.incomingAssociations.add(incomingAssociationsItem);
    return this;
  }

   /**
   * Get incomingAssociations
   * @return incomingAssociations
  **/
  @ApiModelProperty(value = "")
  public List<Association> getIncomingAssociations() {
    return incomingAssociations;
  }

  public void setIncomingAssociations(List<Association> incomingAssociations) {
    this.incomingAssociations = incomingAssociations;
  }

  public PlanItem outgoingAssociations(List<Association> outgoingAssociations) {
    this.outgoingAssociations = outgoingAssociations;
    return this;
  }

  public PlanItem addOutgoingAssociationsItem(Association outgoingAssociationsItem) {
    if (this.outgoingAssociations == null) {
      this.outgoingAssociations = new ArrayList<Association>();
    }
    this.outgoingAssociations.add(outgoingAssociationsItem);
    return this;
  }

   /**
   * Get outgoingAssociations
   * @return outgoingAssociations
  **/
  @ApiModelProperty(value = "")
  public List<Association> getOutgoingAssociations() {
    return outgoingAssociations;
  }

  public void setOutgoingAssociations(List<Association> outgoingAssociations) {
    this.outgoingAssociations = outgoingAssociations;
  }

  public PlanItem entryDependencies(List<PlanItem> entryDependencies) {
    this.entryDependencies = entryDependencies;
    return this;
  }

  public PlanItem addEntryDependenciesItem(PlanItem entryDependenciesItem) {
    if (this.entryDependencies == null) {
      this.entryDependencies = new ArrayList<PlanItem>();
    }
    this.entryDependencies.add(entryDependenciesItem);
    return this;
  }

   /**
   * Get entryDependencies
   * @return entryDependencies
  **/
  @ApiModelProperty(value = "")
  public List<PlanItem> getEntryDependencies() {
    return entryDependencies;
  }

  public void setEntryDependencies(List<PlanItem> entryDependencies) {
    this.entryDependencies = entryDependencies;
  }

  public PlanItem exitDependencies(List<PlanItem> exitDependencies) {
    this.exitDependencies = exitDependencies;
    return this;
  }

  public PlanItem addExitDependenciesItem(PlanItem exitDependenciesItem) {
    if (this.exitDependencies == null) {
      this.exitDependencies = new ArrayList<PlanItem>();
    }
    this.exitDependencies.add(exitDependenciesItem);
    return this;
  }

   /**
   * Get exitDependencies
   * @return exitDependencies
  **/
  @ApiModelProperty(value = "")
  public List<PlanItem> getExitDependencies() {
    return exitDependencies;
  }

  public void setExitDependencies(List<PlanItem> exitDependencies) {
    this.exitDependencies = exitDependencies;
  }

  public PlanItem entryDependentPlanItems(List<PlanItem> entryDependentPlanItems) {
    this.entryDependentPlanItems = entryDependentPlanItems;
    return this;
  }

  public PlanItem addEntryDependentPlanItemsItem(PlanItem entryDependentPlanItemsItem) {
    if (this.entryDependentPlanItems == null) {
      this.entryDependentPlanItems = new ArrayList<PlanItem>();
    }
    this.entryDependentPlanItems.add(entryDependentPlanItemsItem);
    return this;
  }

   /**
   * Get entryDependentPlanItems
   * @return entryDependentPlanItems
  **/
  @ApiModelProperty(value = "")
  public List<PlanItem> getEntryDependentPlanItems() {
    return entryDependentPlanItems;
  }

  public void setEntryDependentPlanItems(List<PlanItem> entryDependentPlanItems) {
    this.entryDependentPlanItems = entryDependentPlanItems;
  }

  public PlanItem exitDependentPlanItems(List<PlanItem> exitDependentPlanItems) {
    this.exitDependentPlanItems = exitDependentPlanItems;
    return this;
  }

  public PlanItem addExitDependentPlanItemsItem(PlanItem exitDependentPlanItemsItem) {
    if (this.exitDependentPlanItems == null) {
      this.exitDependentPlanItems = new ArrayList<PlanItem>();
    }
    this.exitDependentPlanItems.add(exitDependentPlanItemsItem);
    return this;
  }

   /**
   * Get exitDependentPlanItems
   * @return exitDependentPlanItems
  **/
  @ApiModelProperty(value = "")
  public List<PlanItem> getExitDependentPlanItems() {
    return exitDependentPlanItems;
  }

  public void setExitDependentPlanItems(List<PlanItem> exitDependentPlanItems) {
    this.exitDependentPlanItems = exitDependentPlanItems;
  }

  public PlanItem behavior(Object behavior) {
    this.behavior = behavior;
    return this;
  }

   /**
   * Get behavior
   * @return behavior
  **/
  @ApiModelProperty(value = "")
  public Object getBehavior() {
    return behavior;
  }

  public void setBehavior(Object behavior) {
    this.behavior = behavior;
  }

  public PlanItem allDependentPlanItems(List<PlanItem> allDependentPlanItems) {
    this.allDependentPlanItems = allDependentPlanItems;
    return this;
  }

  public PlanItem addAllDependentPlanItemsItem(PlanItem allDependentPlanItemsItem) {
    if (this.allDependentPlanItems == null) {
      this.allDependentPlanItems = new ArrayList<PlanItem>();
    }
    this.allDependentPlanItems.add(allDependentPlanItemsItem);
    return this;
  }

   /**
   * Get allDependentPlanItems
   * @return allDependentPlanItems
  **/
  @ApiModelProperty(value = "")
  public List<PlanItem> getAllDependentPlanItems() {
    return allDependentPlanItems;
  }

  public void setAllDependentPlanItems(List<PlanItem> allDependentPlanItems) {
    this.allDependentPlanItems = allDependentPlanItems;
  }

  public PlanItem parentStage(Stage parentStage) {
    this.parentStage = parentStage;
    return this;
  }

   /**
   * Get parentStage
   * @return parentStage
  **/
  @ApiModelProperty(value = "")
  public Stage getParentStage() {
    return parentStage;
  }

  public void setParentStage(Stage parentStage) {
    this.parentStage = parentStage;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    PlanItem planItem = (PlanItem) o;
    return Objects.equals(this.id, planItem.id) &&
        Objects.equals(this.xmlRowNumber, planItem.xmlRowNumber) &&
        Objects.equals(this.xmlColumnNumber, planItem.xmlColumnNumber) &&
        Objects.equals(this.extensionElements, planItem.extensionElements) &&
        Objects.equals(this.attributes, planItem.attributes) &&
        Objects.equals(this.documentationTextFormat, planItem.documentationTextFormat) &&
        Objects.equals(this.documentation, planItem.documentation) &&
        Objects.equals(this.name, planItem.name) &&
        Objects.equals(this.parent, planItem.parent) &&
        Objects.equals(this.definitionRef, planItem.definitionRef) &&
        Objects.equals(this.planItemDefinition, planItem.planItemDefinition) &&
        Objects.equals(this.itemControl, planItem.itemControl) &&
        Objects.equals(this.criteriaRefs, planItem.criteriaRefs) &&
        Objects.equals(this.entryCriteria, planItem.entryCriteria) &&
        Objects.equals(this.exitCriteria, planItem.exitCriteria) &&
        Objects.equals(this.incomingAssociations, planItem.incomingAssociations) &&
        Objects.equals(this.outgoingAssociations, planItem.outgoingAssociations) &&
        Objects.equals(this.entryDependencies, planItem.entryDependencies) &&
        Objects.equals(this.exitDependencies, planItem.exitDependencies) &&
        Objects.equals(this.entryDependentPlanItems, planItem.entryDependentPlanItems) &&
        Objects.equals(this.exitDependentPlanItems, planItem.exitDependentPlanItems) &&
        Objects.equals(this.behavior, planItem.behavior) &&
        Objects.equals(this.allDependentPlanItems, planItem.allDependentPlanItems) &&
        Objects.equals(this.parentStage, planItem.parentStage);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, xmlRowNumber, xmlColumnNumber, extensionElements, attributes, documentationTextFormat, documentation, name, parent, definitionRef, planItemDefinition, itemControl, criteriaRefs, entryCriteria, exitCriteria, incomingAssociations, outgoingAssociations, entryDependencies, exitDependencies, entryDependentPlanItems, exitDependentPlanItems, behavior, allDependentPlanItems, parentStage);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class PlanItem {\n");

    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    xmlRowNumber: ").append(toIndentedString(xmlRowNumber)).append("\n");
    sb.append("    xmlColumnNumber: ").append(toIndentedString(xmlColumnNumber)).append("\n");
    sb.append("    extensionElements: ").append(toIndentedString(extensionElements)).append("\n");
    sb.append("    attributes: ").append(toIndentedString(attributes)).append("\n");
    sb.append("    documentationTextFormat: ").append(toIndentedString(documentationTextFormat)).append("\n");
    sb.append("    documentation: ").append(toIndentedString(documentation)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    parent: ").append(toIndentedString(parent)).append("\n");
    sb.append("    definitionRef: ").append(toIndentedString(definitionRef)).append("\n");
    sb.append("    planItemDefinition: ").append(toIndentedString(planItemDefinition)).append("\n");
    sb.append("    itemControl: ").append(toIndentedString(itemControl)).append("\n");
    sb.append("    criteriaRefs: ").append(toIndentedString(criteriaRefs)).append("\n");
    sb.append("    entryCriteria: ").append(toIndentedString(entryCriteria)).append("\n");
    sb.append("    exitCriteria: ").append(toIndentedString(exitCriteria)).append("\n");
    sb.append("    incomingAssociations: ").append(toIndentedString(incomingAssociations)).append("\n");
    sb.append("    outgoingAssociations: ").append(toIndentedString(outgoingAssociations)).append("\n");
    sb.append("    entryDependencies: ").append(toIndentedString(entryDependencies)).append("\n");
    sb.append("    exitDependencies: ").append(toIndentedString(exitDependencies)).append("\n");
    sb.append("    entryDependentPlanItems: ").append(toIndentedString(entryDependentPlanItems)).append("\n");
    sb.append("    exitDependentPlanItems: ").append(toIndentedString(exitDependentPlanItems)).append("\n");
    sb.append("    behavior: ").append(toIndentedString(behavior)).append("\n");
    sb.append("    allDependentPlanItems: ").append(toIndentedString(allDependentPlanItems)).append("\n");
    sb.append("    parentStage: ").append(toIndentedString(parentStage)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}
